import request from '@/utils/request'

// 查询承运企业列表
export function listCompany(query) {
  return request({
    url: '/biz/transportCompany/list',
    method: 'get',
    params: query
  })
}


// 获取驻区企业代码
export function getCompanyCode(data) {
  return request({
    url: '/biz/transportCompany/nextCode',
    method: 'post',
    data: data
  })
}

export function getConfigKey(configKey) {
  return request({
    url: '/system/config/configKey/' + configKey,
    method: 'get',
  })
}

// 添加运输企业
export function addTransport(data){
  return request({
    url: '/biz/transportCompany',
    method: 'post',
    data: data
  })
}

// 修改运输企业
export function updateTransport(data){
  return request({
    url: '/biz/transportCompany',
    method: 'put',
    data: data
  })
}

// 获取运输公司详细信息
export function gettransport(companyId){
  return request({
    url: '/biz/transportCompany/' + companyId,
    method: 'get',
  })
}